﻿using H.Eyes;
using H.Types;

namespace H.DML
{
    /// <summary>
    /// 表示大漠的配置信息
    /// </summary>
    public class DMOption : IEyeOption
    {
        /// <inheritdoc/>
        public double Similarly { get; set; } = 1.0;

        /// <inheritdoc/>
        public RGB DeletaColor { get; set; } = new RGB(0);

        /// <inheritdoc/>
        public EyeDirection Direction
        {
            get => _Direction;
            set
            {
                _Direction = value;
                DirectionValue = TranslateDirection(value);
            }
        }

        /// <summary>
        /// 内部存储方向
        /// </summary>
        private EyeDirection _Direction = EyeDirection.FromLeftTop;

        /// <summary>
        /// 方向值数据
        /// </summary>
        internal int DirectionValue { get; private set; } = 0;

        /// <summary>
        /// 将方向枚举值设置为
        /// </summary>
        /// <param name="direction"></param>
        /// <returns></returns>
        private static int TranslateDirection(EyeDirection direction)
        {
            return (int)direction;
        }
    }
}
